import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../components/Login'
import Home from '../components/Home'
import index from "../components/index";
import search from "../components/search";
import SoftwareRegister from "../components/SoftwareRegister";
import RegistrationOfWorks from "../components/RegistrationOfWorks";
import logon from "../components/logon";
import HallOutlets from "../components/HallOutlets";
import softApply from "../components/softApply";
import workApply from "../components/workApply";
import personal from "../components/personal";
import AdminLogin from "../components/AdminLogin";
import AdminManager from "../components/AdminManager";
Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        component: Home,
        redirect: "/index"
    },
    {
        path: '/home',
        component: Home,
        redirect: "/index",/*welcome*/
        children: [
            {path: "/index", component: index},
            {path: "/search", component: search},
            {path: "/SoftwareRegister", component: SoftwareRegister},
            {path: "/RegistrationOfWorks", component: RegistrationOfWorks},
            {path: "/HallOutlets", component: HallOutlets},
            {path: "/softApply", component: softApply},
            {path: "/workApply", component: workApply},
            {path: "/personal", component: personal},
        ]
    },
    {
        path: '/logon',
        component: logon
    },
    {
        path: '/Login',
        component: Login
    },
    {
        path: '/home',
        component: Home
    },
    {
        path: '/AdminLogin',
        component: AdminLogin
    },
    {
        path: '/AdminManager',
        component: AdminManager
    }
]

const router = new VueRouter({
    routes
})

export default router
